How to Run a Miner Node
Miner nodes are integral to our network, taking on tasks and earning rewards through inference.
Please note that miner nodes are still in heavy development and subject to substantial changes. The current GPU mining rewards are 300 $CAI per GPU per day.
Stable Diffusion Miner
Minimum Hardware Configuration
Component | Requirement |
---|---|
GPU | NVIDIA L4, 3080 |
RAM | 8-16 GB |
CPU | 1 core |
Storage | Depends on traffic volume |
Getting Started
Follow these steps to set up and run your Stable Diffusion Miner:
-
Clone the Repository
git clone https://github.com/cuckoo-network/stable-diffusion-miner-docker.git
-
Navigate to the Project Directory
cd stable-diffusion-miner-docker
-
Download the Necessary Files
make download
-
Start the Miner
Add your private key to the command below and start the miner:
ETH_PRIVATE_KEY="" make start
Ensure you have the required hardware and follow the setup instructions carefully. Stay tuned for updates as we continue to develop and enhance the miner node functionality.
How to setup for Bare Metal Ubuntu Server?
Bare Metal Ubuntu Server
Install Nvidia Container Toolkit
If you encounter the following error when running make start
:
[+] Running 1/2
✔ Container webui-docker-relay-node-1 Running 0.0s
⠹ Container webui-docker-auto-1 Starting 0.3s
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown
make: *** [Makefile:11: start] Error 1
It means the Nvidia Container Toolkit is not installed. Follow the official instructions to install the toolkit.
Custom Docker Daemon Configuration
To use a custom configuration file for Docker, follow these steps:
-
Prepare Custom Configuration File Ensure your custom configuration file is located at
$HOME/.config/docker/daemon.json
. -
Modify Docker systemd Service If the
daemon.json
file containsnvidia
but runningsudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
results indocker: Error response from daemon: unknown or invalid runtime name: nvidia.
, modify the Docker systemd service file: -
Create a systemd drop-in directory for the Docker service:
sudo mkdir -p /etc/systemd/system/docker.service.d
-
Create or edit the
override.conf
file in this directory:sudo nano /etc/systemd/system/docker.service.d/override.conf
-
Add the following configuration to specify the custom config file path:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --config-file=/home/your-username/.config/docker/daemon.jsonReplace
your-username
with your actual username. Use the full path instead of$HOME
. -
Apply the Changes Reload the systemd manager configuration and restart Docker:
sudo systemctl daemon-reload
sudo systemctl restart docker -
Verify Configuration Check if Docker is using your custom configuration:
sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
Troubleshooting: Failed to Initialize NVML
If you encounter Failed to initialize NVML: Unknown Error
, follow these steps:
-
Edit the Nvidia container runtime configuration:
sudo vim /etc/nvidia-container-runtime/config.toml
Change
no-cgroups
tofalse
and save the file. -
Restart the Docker daemon:
sudo systemctl restart docker